﻿using System;
using Newtonsoft.Json;

namespace IkeCode.WP7.Toolkit.Persist
{
    /// <summary>
    /// Class to store Class type, Interface type and Obj to persist
    /// </summary>
    [JsonObject(MemberSerialization.OptIn)]
    public partial class IcSmartPersistCacheModel
    {
        /// <summary>
        /// Class Type
        /// </summary>
        [JsonProperty(Order = 1, PropertyName = "ClassType")]
        public Type ClassType { get; set; }
        /// <summary>
        /// Interface Type
        /// </summary>
        [JsonProperty(Order = 2, PropertyName = "InterfaceType")]
        public Type InterfaceType { get; set; }
        /// <summary>
        /// Obj to persist
        /// </summary>
        [JsonProperty(Order = 3, PropertyName = "Obj")]
        public object Obj { get; set; }
        /// <summary>
        /// File name
        /// </summary>
        [JsonProperty(Order = 4, PropertyName = "FileName")]
        public string FileName { get; set; }
        /// <summary>
        /// Last object update
        /// </summary>
        [JsonProperty(Order = 5, PropertyName = "LastUpdate")]
        public DateTime LastUpdate { get; set; }
        /// <summary>
        /// Only cache object, don't persist on ISF
        /// </summary>
        [JsonProperty(Order = 6, PropertyName = "CacheOnly")]
        public bool CacheOnly { get; set; }
    }
}
